package com.ntl.webcore.common.utils.system;

import com.ntl.webcore.tools.spring.reflect.SpringServiceInvokeUtil;

public class SysErrorLogThread implements Runnable{
    private String errorCode;
    private String errorMessage;
    private Exception exception;

    public SysErrorLogThread(String errorCode, String errorMessage, Exception exception) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
        this.exception = exception;
    }

    @Override
    public void run() {
        try{
            SpringServiceInvokeUtil.springInvokeMethod("NTL-SysErrorLogService","insertErrorLog",
                    new Object[]{errorCode,errorMessage,new Exception(exception)});
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
